package analyti

import (
	"fmt"
	"time"
)

type FakeStore struct {
	KeyPrefix string
	HashKeys  bool
	IsCache   bool
}

// Connect will establish a connection this is always true because we are dynamically using redis.
func (r *FakeStore) Connect() bool {
	fmt.Println("....开始链接......")
	return true
}

// AppendToSetPipelined append values to redis pipeline.
func (r *FakeStore) AppendToSetPipelined(key string, values [][]byte) {
	if len(values) == 0 {
		return
	}

	fmt.Println("....保存了数据")
}

func (r *FakeStore) GetAndDeleteSet(keyName string) []interface{} {
	fmt.Println("....GetAndDeleteSet")
	return nil
}

// SetExp set expiry of the given key.
func (r *FakeStore) SetExp(keyName string, timeout time.Duration) error {
	fmt.Println("....SetExp")
	return nil
}

// GetExp return the expiry of the given key.
func (r *FakeStore) GetExp(keyName string) (int64, error) {
	fmt.Println("....GetExp")
	return 0, nil
}
